/*userButton
Qiang.DAI
2025.08.30
YYYY.MM.DD
*/
#ifndef _USER_BUTTON_H_
#define _USER_BUTTON_H_

#include "main.h"
#include "userInputPin.h"
#include "toolSM.h"

typedef struct buttonClass {
s_StateTransform_t *mBtnTransTab_ptr;
uint8_t(*getBtnStaus)(struct buttonClass *);
s_Statemachine_t *mBtnStateMachine_ptr;
K_InputPin_t *mBtnInputPin_ptr;	
uint8_t mButtonStaus;
SmState_t	mSmDefaultState;
} k_Button_t;

typedef enum {
BTN_LF = 1,
BTN_RT,
BTN_BK,
BTN_FR,
BTN_AX1,
BTN_AX2,
BTN_AX3,
BTN_AX4,	
}buttonTag_t;

uint8_t userButton_Init(void);

/*Scan All Butten, run butten StateMachine*/
void userButtonScan(void);

#endif /*_USER_BUTTON_H_*/

